package com.smart.milvus.annotation;

import org.intellij.lang.annotations.Language;

import java.lang.annotation.*;

@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Language("SpEL")
public @interface DynamicCollection {

    @Language("SpEL")
    // language=SpEL
    String databaseName() default "'default'";

    @Language("SpEL")
    // language=SpEL
    String collectionName() default "";

    VectorColumn[] value() default {};

    /**
     * @return 表描述
     */
    String description() default " create by imilvus ";

    @Documented
    @Retention(RetentionPolicy.RUNTIME)
    @Target({ElementType.TYPE})
    @Repeatable(DynamicCollection.class)
    @interface VectorColumn {
        String field();

        @Language("SpEL")
        // language=SpEL
        String dimension();
    }
}
